home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / Comm / AmiTCP30b2.lha / src / amitcp / kern / amiga_log.h < prev    next >
C/C++ Source or Header  |  1994-01-05  |  4KB  |  120 lines

  1. /*
  2.  * $Id: amiga_log.h,v 1.19 1994/01/05 10:02:50 jraja Exp $
  3.  *
  4.  * Copyright (c) 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
  5.  *                    Helsinki University of Technology, Finland.
  6.  *                    All rights reserved.
  7.  *
  8.  * HISTORY
  9.  * $Log: amiga_log.h,v $
  10.  * Revision 1.19  1994/01/05  10:02:50  jraja
  11.  * Removed external definition of the log_message.
  12.  *
  13.  * Revision 1.18  1993/11/06  23:51:22  ppessi
  14.  * Removed struct stuffchar.
  15.  *
  16.  * Revision 1.17  1993/10/07  22:41:34  ppessi
  17.  * Added time to the log message.
  18.  *
  19.  * Revision 1.16  1993/06/04  11:16:15  jraja
  20.  * Fixes for first public release.
  21.  *
  22.  * Revision 1.15  1993/05/17  01:02:04  ppessi
  23.  * Changed RCS version
  24.  *
  25.  * Revision 1.14  1993/05/05  16:10:05  puhuri
  26.  * Fixes for final demo.
  27.  *
  28.  * Revision 1.13  93/04/29  22:03:40  22:03:40  puhuri (Markus Peuhkuri)
  29.  * replaced distinct configuration variables with structure,
  30.  * 
  31.  * Revision 1.12  93/04/28  12:58:42  12:58:42  puhuri (Markus Peuhkuri)
  32.  * Add defination for configuration variables.
  33.  * 
  34.  * Revision 1.11  93/04/26  18:54:29  18:54:29  puhuri (Markus Peuhkuri)
  35.  * Removed declaration of closelog() as such function does not exists any more.
  36.  * 
  37.  * Revision 1.10  93/04/23  02:28:44  02:28:44  ppessi (Pekka Pessi)
  38.  * Number and length of logging messages made configreable.
  39.  * 
  40.  * Revision 1.9  93/04/21  19:11:21  19:11:21  puhuri (Markus Peuhkuri)
  41.  * Moved some constants from sys/syslog.h.
  42.  * 
  43.  * Revision 1.8  93/04/17  17:17:51  17:17:51  puhuri (Markus Peuhkuri)
  44.  * Changed the name of logging task to NETTRACE
  45.  * 
  46.  * Revision 1.7  93/03/09  13:32:55  13:32:55  puhuri (Markus Peuhkuri)
  47.  * Now stores information of failed log attempts using new function
  48.  * GetLogMsg. (Increments the number of failed, which is then printed
  49.  * (and zeroed) as logging task gets next message (ts handles it))
  50.  * 
  51.  * Revision 1.6  93/03/05  03:25:51  03:25:51  ppessi (Pekka Pessi)
  52.  * Compiles with SASC. Initial test version.
  53.  * 
  54.  * Revision 1.5  93/03/04  09:43:29  09:43:29  jraja (Jarno Tapio Rajahalme)
  55.  * Fixed includes.
  56.  * 
  57.  * Revision 1.4  93/03/01  19:10:08  19:10:08  puhuri (Markus Peuhkuri)
  58.  * Add variable buuffer
  59.  * 
  60.  * Revision 1.3  93/02/25  19:36:30  19:36:30  puhuri (Markus Peuhkuri)
  61.  * Protected for multitime include, functions redefined,
  62.  * AMITCP-name removed and struct log_msg moved from sys/syslog.h
  63.  * 
  64. */
  65. #ifndef KERN_AMIGA_LOG_H
  66. #define KERN_AMIGA_LOG_H
  67.  
  68. #define LOG_TASK_NAME "NETTRACE"
  69. #define LOG_TASK_PRI 4
  70. #define LOG_BUFS 4
  71. #define LOG_BUF_LEN 128
  72. #define TOCONS    0x01
  73. #define TOTTY    0x02
  74. #define TOLOG    0x04
  75. #define END_LOG -1
  76.  
  77. /*
  78.  * Configuration structure
  79.  */ 
  80. struct log_cnf {
  81.   u_long log_bufs;
  82.   u_long log_buf_len;
  83. }; 
  84. extern struct log_cnf log_cnf;
  85.  
  86. /*
  87.  * These are options to config log
  88.  */
  89. #define LOG_CLOSE 0xff000000
  90. #define LOG_CONFILE 0xfe000000
  91. #define LOG_LOGFILE 0xfd000000
  92. #define LOG_PORTOPEN 0xfc000000
  93. #define LOG_PORTCLOSE 0xfb000000
  94. #define LOG_CONGIF 0xff000000
  95.  
  96. extern struct Task *Nettrace_Task;
  97. extern struct Process *logProc;
  98. extern BOOL log_init(void);
  99. extern void log_deinit(void);
  100. extern struct log_msg *GetLogMsg(struct MsgPort *);
  101.  
  102. extern struct MsgPort *logReplyPort;
  103. extern struct MsgPort *logPort;
  104.  
  105. struct log_msg {
  106.   struct Message msg;        /* Standard Exec message */
  107.   ULONG level;            /* Level of log message */
  108.   UBYTE * string;        /* Pointer to string */
  109.   ULONG chars;            /* Length of string */
  110.   ULONG time;            /* Logging time */
  111. };
  112.  
  113. extern struct log_msg *log_message;
  114. extern STRPTR consolename, logfilename;
  115. extern struct log_cnf log_cnf;
  116.  
  117. /* extern void stuffchar(...);*/
  118.  
  119. #endif /* KERN_AMIGA_LOG_H */
  120.